<template>
  <div class="pv-container">
    <div v-if="showHead" class="pv-head">
      <img src="@/assets/images/back.png" alt="" class="back" @click="onBack" />
      <span class="head-title">智慧终端</span>
    </div>
    <div class="content">
      <iframe :src="urls[key]" frameborder="0" class="pv-iframe"></iframe>
    </div>
  </div>
</template>

<script>
  const urls = {
    falvzy: 'http://zhsk.12348.gov.cn/qa.wap/?timestamp-1570977277320=1570977277320',
    falvfatiao: 'http://search.chinalaw.gov.cn/search2.html',
    anli: 'http://alk.12348.gov.cn/',

    c1: "https://ai.12348.gov.cn/pc/g/60BB1CB85ACB45A4B5260D900AD6955C?appId=B9DA67CEC13D68B4D73D463C05046158&action=start",
    c2: "https://ai.12348.gov.cn/g/work_ca_eva?device_type=2",
    c3: "https://ai.12348.gov.cn/pc/g/439C655A22D849F4BB65282D083C3B5D?appId=B9DA67CEC13D68B4D73D463C05046158",
    c4: "https://ai.12348.gov.cn/pc/g/7A72E670F0614EECB5143DA4E4438CF7?appId=B9DA67CEC13D68B4D73D463C05046158",
    c5: "https://ai.12348.gov.cn/pc/g/C1802B0E2EA0468F86AB94D1F7E503EE?appId=B9DA67CEC13D68B4D73D463C05046158",
    c6: "https://ai.12348.gov.cn/pc/g/B5122D9764174D38AE999DD363457986?appId=B9DA67CEC13D68B4D73D463C05046158",
    c7: "https://ai.12348.gov.cn/pc/g/839C5A6692B9484DB021ED9A3EE8BF40?appId=B9DA67CEC13D68B4D73D463C05046158",


    l1: "http://chinapeace.gov.cn/",
    l2: "http://www.legalinfo.gov.cn/pub/sfbzhfx/index.html",
    l3: "https://www.chinacourt.org/index.shtml",
    l4: "http://www.cqfzb.org/legalweb",
    l5: "https://www.cqrb.cn/",
    l6: "http://www.legaldaily.com.cn/locality/node_30971.htm",
    l7: "https://www.jrcq.cn/",
    l8: "http://www.chinalaw.org.cn/",
    l9: "http://www.12348.gov.cn/sfbMobile/app/page/fzxc/fzxc.html?timestamp-1570976220401=1570976220401",
    l10: "http://www.cqfzb.org/legalweb/newsList?frameId=53&frameName=%E7%9E%B0%E7%A4%BE%E4%BC%9A",

    // n0: 'http://www.chinapeace.gov.cn/chinapeace/c100111/2020-12/30/content_12432392.shtml',//原有
    n0: 'http://www.cqfzb.org/legalweb/detail?contentId=74952',//更改
    n1: 'http://www.pacq.gov.cn/m/view.php?aid=102428',
    n2: 'http://www.pacq.gov.cn/m/view.php?aid=102338',
    n3: 'http://www.pacq.gov.cn/m/view.php?aid=102055',
    n4: 'http://www.pacq.gov.cn/m/view.php?aid=102022',
    n5: 'http://www.pacq.gov.cn/m/view.php?aid=101947',
    n6: 'http://www.cqfzb.org/legalweb/detail?contentId=75011&newsFrameName=%E5%8F%B8%E6%B3%95%E4%B8%93%E5%88%8A',
    n7: 'http://www.cqfzb.org/legalweb/detail?contentId=74682&newsFrameName=%E5%8F%B8%E6%B3%95%E4%B8%93%E5%88%8A',


    nm1: 'http://www.12348.gov.cn/sfbMobile/app/page/farmworker/farmwork.html?timestamp-1606798646980=1606798646980',
  }
  export default {
    data() {
      return {
        urls,
        key: this.$route.query.key
      }
    },
    mounted: {
      showHead() {
        return key !== 'nm1'
      }
    },
    methods: {
      onBack() {
        this.$router.go(-1);
      },
    },
  }
</script>

<style lang="less" scoped>
.pv-container{

}
.pv-head {
  background: rgb(156, 18, 13);
  height: 0.44rem;
  position: relative;
  text-align: center;
  .back {
    position: absolute;
    width: 0.26rem;
    height: 0.26rem;
    display: block;
    left: 0.12rem;
    top: 0.09rem;
  }
  .head-title {
    font-size: 0.16rem;
    line-height: 0.44rem;
    color: #fff;
  }
}
.content {
  height: calc(100vh - 0.44rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #fff;
}
.pv-iframe{
  height: 100%;
  width: 100vw;
}

</style>
<style lang="less">
  .pv-iframe{
    .newModule{
      display: none;
    }
  }
</style>